package throwExample;

public class UserService {
	public int m1(String name) throws NameLengthException {
		if (name.length() < 6) {
//			System.out.println("用户名长度不能小于六位");
			throw new NameLengthException(" 用户名长度不能小于六位");
		}
		System.out.println("登录成功");
		return 1;
	}
}
